<template>
    <el-menu default-active="1" @select="handleSelect" class="aside-nav" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
        <el-menu-item v-for="(item, key) in data" :key="key" :index="item.index">
            <i class="el-icon-menu"></i>
            <span slot="title">{{ item.title }}</span>
        </el-menu-item>
    </el-menu>
</template>

<script>

export default {
  data() {
    return {};
  },
  props: {
    data: Array
  },
  methods: {
    handleSelect(index) {
      this.$router.push(index);
    }
  }
};
</script>

<style lang="scss" scoped>
.aside-nav {
  height: 100%;
}
</style>
